package com.srmt.feishu.client.model;

/**
 * 维度范围定义
 * 
 * @author SRMT Development Team
 * @since 5.1.0
 */
public class DimensionRange {
    private String sheetId;
    private MajorDimension majorDimension;
    private int startIndex;
    private int endIndex;
    
    // 构造函数
    public DimensionRange() {}
    
    public DimensionRange(String sheetId, MajorDimension majorDimension, int startIndex, int endIndex) {
        this.sheetId = sheetId;
        this.majorDimension = majorDimension;
        this.startIndex = startIndex;
        this.endIndex = endIndex;
    }
    
    // Builder模式
    public static Builder builder() {
        return new Builder();
    }
    
    public static class Builder {
        private String sheetId;
        private MajorDimension majorDimension = MajorDimension.ROWS;
        private int startIndex;
        private int endIndex;
        
        public Builder sheetId(String sheetId) {
            this.sheetId = sheetId;
            return this;
        }
        
        public Builder majorDimension(MajorDimension majorDimension) {
            this.majorDimension = majorDimension;
            return this;
        }
        
        public Builder startIndex(int startIndex) {
            this.startIndex = startIndex;
            return this;
        }
        
        public Builder endIndex(int endIndex) {
            this.endIndex = endIndex;
            return this;
        }
        
        public DimensionRange build() {
            return new DimensionRange(sheetId, majorDimension, startIndex, endIndex);
        }
    }
    
    // 枚举定义
    public enum MajorDimension {
        ROWS("ROWS"),
        COLUMNS("COLUMNS");
        
        private final String value;
        
        MajorDimension(String value) {
            this.value = value;
        }
        
        public String getValue() {
            return value;
        }
    }
    
    // Getters and Setters
    public String getSheetId() { 
        return sheetId; 
    }
    
    public void setSheetId(String sheetId) { 
        this.sheetId = sheetId; 
    }
    
    public MajorDimension getMajorDimension() { 
        return majorDimension; 
    }
    
    public void setMajorDimension(MajorDimension majorDimension) { 
        this.majorDimension = majorDimension; 
    }
    
    public int getStartIndex() { 
        return startIndex; 
    }
    
    public void setStartIndex(int startIndex) { 
        this.startIndex = startIndex; 
    }
    
    public int getEndIndex() { 
        return endIndex; 
    }
    
    public void setEndIndex(int endIndex) { 
        this.endIndex = endIndex; 
    }
}